<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue页面结构</title>
    <script src="./lib/vue-2.4.0.js"></script>
    <style>
        .p{
            position: relative;
        }
        /* ===========slide============ */
        /* 开始进入  离开后*/
         .slide-enter,.slide-leave-active{
            left:100px;
        }
        /* 进入中 */
        .slide-enter-active,.slide-leave-active{
            transition: all 0.4s;
        }
        /* 进入后  开始离开*/
        .slide-enter-to,.slide-leave{
            left:0px;
        }
        /* ===============fade=========== */
        .fade-enter,.fade-leave-to{
            opacity: 0;
        }
        .fade-enter-active,.fade-leave-active{
            transition: all 0.4s;
        }
        .fade-enter-to,.fade-leave{
            opacity: 1;
        }
    </style>
</head>
<body>
    <div id="app">

        <transition name='fade'>
        <p class="p" v-show='isShow'>hello vuejs</p>
        </transition>
        <button  @click="isShow=!isShow">slide</button>

    </div>
</body>
<script>
    var vm=new Vue({
        el:'#app',
        data:{
            isShow:true
        },
        methods:{
        },
        //生命周期函数
        created:function(){
        },
        mounted:function(){
        }
    });
</script>
</html>